<?php
/*
   代理商品管理
*/
class GoodsController extends AdminController {
    /*
        actionIndex  代理商品列表
        actionEdit   编辑代理商品
        actionDelete  删除代理商品
    */
	public $modelName = 'VGoodsAgentable';
	public function outerActions() {
		return array(
			'admin' => 'actions.agent.agentableAdmin',
		);
	}
	
	public function actionDeagent($id) {
		$model = $this->loadModel($id);
		$model->deagent();
		CControllerHelper::redirectReferrer();
	}
	
	public function actionAgent($id) {
		$model = $this->loadModel($id);
		$model->agent();
		CControllerHelper::redirectReferrer();
	}
}
?>